package zb.thr2;

import java.util.concurrent.TimeUnit;

/**
 * @author wzby
 * @Date: 2022/8/8 16:05
 */
public class Tdemo {
    public static void main(String[] args) {
        Tdemo td = new Tdemo();
        new Thread(td::show,"td1").start();
        new Thread(td::show,"td2").start();
        new Thread(td::show,"td3").start();
    }


    void show(){
        try {
            TimeUnit.SECONDS.sleep(3);
        }catch (Exception e){
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName());
    }
}
